<template>
  <div class="app-container">
    <!-- 分期信息 -->
    <h5 class="titleInfo">分期信息</h5>
    <div class="divTable">
      <el-table :data="tableData" border>
        <el-table-column align="center" prop="number" label="期数" />
        <el-table-column align="center" prop="type" label="返款类型" />
        <el-table-column align="center" prop="coin" label="金币" />
       <!-- <el-table-column align="center" prop="" label="金币发放计算规则" />-->
        <el-table-column align="center" prop="credit" label="银币" />
        <el-table-column align="center" prop="createdAt" label="返款日期" />
         <el-table-column align="center" prop="taskType" label="发放状态" >
             <template slot-scope="scope">
               <div v-if="scope.row.taskType =='0'">正常</div>
               <div v-if="scope.row.taskType =='1'">提前发放</div>
             </template>
         </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import { getRewardList } from '@/api/subsidyManage'
export default {
  name: 'SubsidyManageInstallment',
  data() {
    return {
      tableData: [],
      userId: null
    }
  },
  mounted() {
    this.userId = String(this.$route.query.id)
    const datas = {
      id: this.userId,
      pageNum: 1,
      pageSize: 10000
    }
    getRewardList(datas).then(res => {
      this.tableData = res.data.data
      // console.log(res)
    })
  }
}
</script>
<style scoped>
.app-container {
  padding: 0px !important;
}
.divTable {
  padding: 0 20px 20px 20px;
}
</style>
